package com.multi.thread.chapter03.demo12;

import java.io.IOException;
import java.io.PipedOutputStream;

public class WriteData {
	
	public void writMethod(PipedOutputStream out) {
		try {
			System.out.println("out : " + System.currentTimeMillis());
			for (int i = 0; i < 100; i++) {
				String outData = String.valueOf(i + 1);
				out.write(outData.getBytes());
				System.out.print(outData);
			}
			System.out.println();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
